# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Roberto Oliveira <robertoguimaraes8@gmail.com>
pkgname=godep
pkgver=80
pkgrel=4
pkgdesc="Dependency tool for go"
url="https://github.com/tools/godep"
arch="all !mips !mips64" # limited by go
license="BSD-3-Clause"
makedepends="go"
options="!check"
source="$pkgname-$pkgver.tar.gz::https://github.com/tools/$pkgname/archive/v$pkgver.tar.gz"
builddir="$srcdir/src/github.com/tools/$pkgname"

prepare() {
	default_prepare
	mkdir -p "${builddir%/*}"
	mv "$srcdir"/$pkgname-$pkgver "$builddir"
}

build() {
	GOPATH="$srcdir" go build
}

check() {
	export EMAIL="Test User <user@example.com>"
	GOPATH="$srcdir" go test
}

package() {
	install -Dm755 "$builddir"/$pkgname "$pkgdir"/usr/bin/godep
}

sha512sums="27e4e3bf746dbfb71aa05e53c5cb2e7eb5ef714d5687739b7a429d699545dc760e4ee90d601091a45239ca3a9827b10957459fb5e647c2b8f3c59fcf6515753b  godep-80.tar.gz"
